import request from '@/utils/request'

// 查询商家列表
export function listBusiness(query) {
  return request({
    url: '/business/business/list',
    method: 'get',
    params: query
  })
}

// 查询商家详细
export function getBusiness(id) {
  return request({
    url: '/business/business/' + id,
    method: 'get'
  })
}
// id查询
export function findmerchantId(merchantId) {
  return request({
    url: '/business/business/findmerchantId/?merchantId=' + merchantId,
    method: 'get'
  })
}

// 新增商家
export function addBusiness(data) {
  return request({
    url: '/business/business',
    method: 'post',
    data: data
  })
}
// 新增商家打款记录
export function addBusinessVerify(tbBusinessVerify) {
  return request({
    url: '/business/business/addBusinessVerify',
    method: 'post',
    data: tbBusinessVerify
  })
}

// 修改商家
export function updateBusiness(data) {
  return request({
    url: '/business/business',
    method: 'put',
    data: data
  })
}

// 删除商家
export function delBusiness(id) {
  return request({
    url: '/business/business/' + id,
    method: 'delete'
  })
}

//营业执照
export function businessCheck() {
  return request({
    url: '/business/business/businessCheck',
    method: 'get',
  })
}
//银行卡
export function bankcheck(bankCode) {
  return request({
    url: '/business/business/bankCheck/'+bankCode,
    method: 'get'
  })
}

// 身份证验证
export function idcheck(id,name) {
  return request({
    url: '/business/business/idcard/'+id+'/'+name,
    method: 'post',

  })
}
